196219eb771cf35a6f409d497e9c98b2aabf5c82,src/frontend/org/voltdb/messaging/SocketJoiner.java,SocketJoiner,runJoinExisting,#,496

Before Change


                if (m_hostLog != null)
                    m_hostLog.error("Maximum clock/network is " + (maxDiffMS*100)/MAX_ACCEPTABLE_TIME_DIFF_IN_MS +
                                   "% higher than allowable limit");
                VoltDB.crashVoltDB();
            }
        }
        catch (IOException e) {

After Change


                i++;
            }

            int errors = 0;

            // figure out how bad the skew is and if it's acceptable
            long minimumDiff = 0;
            long maximumDiff = 0;
            for (long diff : difftimes) {
                if (diff > maximumDiff)
                    maximumDiff = diff;
                if (diff < minimumDiff)
                    minimumDiff = diff;
            }
            long maxDiffMS = maximumDiff - minimumDiff;
            if (maxDiffMS > MAX_ACCEPTABLE_TIME_DIFF_IN_MS)
                errors |= NTP_FAILURE;

            // ensure all hostids are the same
            m_localHostId = readHostIds[0];
            recoveryLog.info("Selecting host id " + m_localHostId);
            for (i = 1; i < readHostIds.length; i++) {
                if (readHostIds[i] != m_localHostId) {
                    errors |= HOSTID_FAILURE;
                }
            }

            // figure out if any catalogs are not identical
            for (long crc : othercrcs) {
                if (crc != m_catalogCRC) {
                    errors |= CRC_FAILURE;
                }
            }

            // ensure all catalog versions are the same
            m_discoveredCatalogVersion = catalogVersions[0];
            for (int version : catalogVersions) {
                if (version != m_discoveredCatalogVersion) {
                    errors |= CATVER_FAILURE;
                }
            }

            for (Entry<Integer, SocketChannel> e : m_sockets.entrySet()) {
                out = getOutputForHost(e.getKey());
                out.writeLong(maxDiffMS);
                if (errors == 0) {
                    out.writeInt(COMMAND_COMPLETE);
                }
                else {
                    out.writeInt(COMMAND_JOINFAIL);
                    out.writeInt(errors);
                }
                out.flush();
            }

            if (m_hostLog != null)
                m_hostLog.info("Maximum clock/network skew is " + maxDiffMS + " milliseconds (according to rejoined node)");
            if ((errors & NTP_FAILURE) != 0) {
                if (m_hostLog != null)
                    m_hostLog.error("Maximum clock/network is " + (maxDiffMS*100)/MAX_ACCEPTABLE_TIME_DIFF_IN_MS +
                                   "% higher than allowable limit");
            }
            if ((errors & CRC_FAILURE) != 0) {
                if (m_hostLog != null)
                    m_hostLog.error("Catalog checksums do not match across cluster");
            }
            if ((errors & HOSTID_FAILURE) != 0) {
                if (m_hostLog != null) {
                    m_hostLog.error("Cluster nodes didn't agree on a host id for the rejoining node.");
                    m_hostLog.error("This is likely a bug in VoltDB and you should contact the VoltDB team.");
                }
            }
            if ((errors & CATVER_FAILURE) != 0) {
                if (m_hostLog != null) {
                    m_hostLog.error("Cluster nodes didn't agree on all catalog metadata.");
                    m_hostLog.error("This is likely a bug in VoltDB and you should contact the VoltDB team.");
                }
            }
            if (errors != 0) {
                VoltDB.crashVoltDB();
            }
        }
        catch (IOException e) {